﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using AliveCard;

[CustomEditor(typeof(Room))]
public class RoomEditor : Editor
{
    private SerializedObject obj;
    Room targetobj;
    void OnEnable()
    {
        targetobj = target as Room;
        obj = new SerializedObject(target);
    }
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        obj.Update();

        bool LBWall = targetobj.m_wallLB.activeSelf;
        LBWall = EditorGUILayout.Toggle("左下角墙显示", LBWall);
        bool RBWall = targetobj.m_wallRB.activeSelf;
        RBWall = EditorGUILayout.Toggle("右下角墙显示", RBWall);
        targetobj.SetupLayer(LBWall, RBWall);
        
        obj.ApplyModifiedProperties();
    }


}

